//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<CShadingPass9.h>
///	@path	~/src/graphics/dx9/
///	@date	2007/11/15
///	@desc	Forward shading pass.

#pragma once

#include "xeres.h"

#include "graphics/IPass.h"

namespace xeres {

	/*!
		\class	CShadingPass9
		\brief	Pass performs shading operation.
				Usually used in forward shading pass.
	*/
	class CShadingPass9 : public IPass
	{
	public:

		/// \ctor
		CShadingPass9( void );

		/// \dtor
		virtual ~CShadingPass9( void );

		DECL_IOBJECT_CLASS_DYNAMIC( CShadingPass9 , IPass );

	public:

		// interface

		/*!
			\brief		Initialize render pass.
		*/
		virtual void Initialize( RefWeak<IDevice> device );

		/*!
			\brief		Finalize render pass.
		*/
		virtual void Finalize( void );

		/*!
			\brief		Begin to draw current pass.
		*/
		virtual void Begin( RenderContext& rc );

		/*!
			\brief		End current pass.
		*/
		virtual void End( RenderContext& rc );

		/*! 
			\brief		Set pass view.
		*/
		virtual void SetPassView( RefWeak<IView> view );

		/*! 
			\brief		Get pass view.
		*/
		virtual RefWeak<IView> GetPassView( void );

	private:

		//@ data
		Ref<IView>		m_view;

		// background color
		PackColor4		m_backgroundColor;
	};

} // namespace xeres
